<!--
*Author：
 *Contact：
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/workbusiness/INTE_SHELVES.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/workbusiness/INTE_SHELVES.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'INTE_SHELVES_Id',
                footer: "Foots",
                cnName: '货位维护表',
                name: 'workbusiness/INTE_SHELVES',
                url: "/INTE_SHELVES/",
                sortName: "CreateOn,LocationCode"
            });
            const editFormFields = ref({"Identifier":"","ShelfNameZH":"","LocationCode":"","Description":"","LocatiobnFloor":"","LocationRow":"","LocationColumn":"","Status":"","MovePathSubId":"","WarehouseId":"","RfidCode":"","OrderCode":"","HolderTypeId":"","DBCode":""});
            const editFormOptions = ref([[{"title":"描述","field":"Description","type":"text"},
                               {"title":"编码","field":"Identifier","type":"text"},
                               {"title":"名称","field":"ShelfNameZH","type":"text"},
                               {"dataKey":"点位","data":[],"title":"地点","field":"LocationCode","type":"select"}],
                              [{"title":"点层","field":"LocatiobnFloor","type":"text"},
                               {"title":"点行","field":"LocationRow","type":"text"},
                               {"title":"点列","field":"LocationColumn","type":"text"},
                               {"title":"是否空","field":"Status","type":"text"}],
                              [{"dataKey":"路径点","data":[],"title":"所属路径点","field":"MovePathSubId","type":"select"},
                               {"dataKey":"仓库","data":[],"title":"仓库","field":"WarehouseId","type":"select"}],
                              [{"title":"RfidCode","field":"RfidCode","type":"text"},
                               {"title":"工单号","field":"OrderCode","type":"text"},
                               {"dataKey":"刀柄类型","data":[],"title":"刀柄类型","field":"HolderTypeId","type":"select"},
                               {"title":"DbCode","field":"DBCode","type":"number"}]]);
            const searchFormFields = ref({"Identifier":"","WarehouseId":"","HolderTypeId":""});
            const searchFormOptions = ref([[{"title":"编码","field":"Identifier","type":"text"},{"dataKey":"仓库","data":[],"title":"仓库","field":"WarehouseId","type":"select"},{"dataKey":"刀柄类型","data":[],"title":"刀柄类型","field":"HolderTypeId","type":"select"}]]);
            const columns = ref([{field:'INTE_SHELVES_Id',title:'INTE_SHELVES_Id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Identifier',title:'编码',type:'string',width:110,align:'left',sort:true},
                       {field:'ShelfNameZH',title:'名称',type:'string',link:true,width:110,align:'left'},
                       {field:'LocationCode',title:'地点',type:'string',bind:{ key:'点位',data:[]},width:110,align:'left'},
                       {field:'RfidCode',title:'RfidCode',type:'string',width:120,align:'left'},
                       {field:'OrderCode',title:'工单号',type:'string',width:120,align:'left'},
                       {field:'LocatiobnFloor',title:'点层',type:'string',width:60,align:'left'},
                       {field:'LocationRow',title:'点行',type:'string',width:60,align:'left'},
                       {field:'LocationColumn',title:'点列',type:'string',width:60,align:'left'},
                       {field:'MovePathSubId',title:'所属路径点',type:'string',bind:{ key:'路径点',data:[]},width:120,align:'left'},
                       {field:'Status',title:'是否空',type:'string',width:110,align:'left'},
                       {field:'WarehouseId',title:'仓库',type:'string',bind:{ key:'仓库',data:[]},width:120,align:'left'},
                       {field:'HolderTypeId',title:'刀柄类型',type:'string',bind:{ key:'刀柄类型',data:[]},width:120,align:'left'},
                       {field:'DBCode',title:'DbCode',type:'int',sort:true,width:60,align:'left'},
                       {field:'ToolId',title:'刀具',type:'string',bind:{ key:'刀具',data:[]},width:120,align:'left'},
                       {field:'CreateBy',title:'创建人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateOn',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'UpdateBy',title:'更新人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'LastUpdateOn',title:'更新时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'IsDeleted',title:'逻辑删除0/不删除1/已删除',type:'bool',width:110,hidden:true,align:'left'},
                       {field:'Description',title:'描述',type:'string',width:220,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
